/*
 * @Author: 李小晴 2689279066@qq.com
 * @Date: 2023-06-13 13:55:22
 * @LastEditors: 李小晴 2689279066@qq.com
 * @LastEditTime: 2023-07-18 16:52:17
 * @FilePath: \sys\src\api\sp\feed\index.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { useAxios } from '@/hooks/web/useAxios'
const request = useAxios()

import { useCache } from '@/hooks/web/useCache'
const { wsCache } = useCache()

// 列表
export const spFeedPlanListApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'spFeedPlanList',
      data: data
    }
  })
}
// 喂养计划查看
export const spFeedPlanSeeApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'spFeedPlanSee',
      data: data
    }
  })
}
// 喂养计划编辑
export const spFeedPlanEditApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'spFeedPlanEdit',
      data: data
    }
  })
}
// 新增
export const spFeedPlanAddAdminApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'spFeedPlanAddAdmin',
      data: data
    }
  })
}
// 喂养计划删除
export const spFeedPlanDelApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'spFeedPlanDel',
      data: data
    }
  })
}

// 喂养编辑
export const spFeedEditApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'spFeedEdit',
      data: data
    }
  })
}

// 归档
export const spFeedConfirmApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'spFeedConfirm',
      data: data
    }
  })
}

// 批量归档
export const spFeedBatchConfirmApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'spFeedBatchConfirm',
      data: data
    }
  })
}

// 喂养列表
export const spFeedListApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'spFeedList',
      data: data
    }
  })
}
// 喂养新增
export const spFeedAddAdminApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'spFeedAddAdmin',
      data: data
    }
  })
}
// 喂养查看
export const spFeedSeeApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'spFeedSee',
      data: data
    }
  })
}
// 喂养资产查看
export const spFeedAssetListApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'spFeedAssetList',
      data: data
    }
  })
}
// 喂养删除
export const spFeedDelApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'spFeedDel',
      data: data
    }
  })
}
